<template>
	<view style="background: #f2f2f2;">
		<!--header-->
		<view class="tui-mybg-box" style="color: #666;">
			<view class="" style="height: 220rpx;"></view>	
			<view class="tui-header-center" style="color: #000;">
				<image :src="info.app.cdnurl+userInfo.avatar" v-if="userInfo && userInfo.avatar" class="tui-avatar" @click="userInfoClick"></image>
				<image :src="info.app.cdnurl+'/assets/addons/shop/uniapp/default_avatar.png'" v-else class="tui-avatar"></image>
				<view class="tui-info" v-if="isLogin"  @click="userInfoClick">
					<view class="tui-nickname" style="color: #000;">
						{{userInfo.nickname}}
					</view>
					<view class="tui-explain" style="color: #000;">{{userInfo.group_name}}</view>
				</view>
				<view class="tui-login" v-if="!isLogin" @tap="login">
					<text>登录/注册</text>
					<text class="tn-icon-right"></text>

				</view>
				<!-- #ifndef MP -->
				<view class="tui-btn-edit" v-if="isLogin">
					<tn-button size="sm" style="background:#007aff;color: #fff;" shape="round"
						 @tap="userInfoClick">编辑</tn-button>
				</view>
				<!-- #endif -->
				<!-- #ifdef MP -->
				<!-- #endif -->
			</view>
		</view>
		<view v-if="isLogin && !userInfo.mobile" style="background: #fff;color: #ff690d;display: flex;justify-content: space-between;padding: 20rpx 30rpx;align-items: center;margin: 20rpx 0;">
			<view class="" style="display: flex;justify-content: space-around;align-items: center;font-size: 26rpx;">
				<text class="tn-icon-phone" style="color: #ff690d;margin-right: 25rpx;"></text>
				<view class=""> 点击绑定手机号确保账户安全 </view>
			</view>
			<view class=""
				style="background: #ff6100;padding: 10rpx 20rpx;border-radius: 30rpx;color: #fff;font-size: 24rpx;"
				@click="bindphone">去绑定</view>
		</view>
		<view class="tui-content-box">
			<view class="tui-box tui-order-box">
				<tui-list-cell :arrow="true" padding="0" :lineLeft="false">
					<view class="tui-cell-header">
						<view class="tui-cell-title">我的订单</view>
						<view class="tui-cell-sub" @click="myOrder(0)">查看全部订单</view>
					</view>
				</tui-list-cell>
				<view class="tui-order-list" style="margin-top: 20rpx;">
					<view class="tui-order-item" @tap="myOrder(1)">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/mine/pay.png" class="tui-order-icon"></image>
							<view class="tui-badge tui-badge-red"
								v-if="tageList.order_num && tageList.order_num.unpaid && tageList.order_num.unpaid>=1">
								{{tageList.order_num.unpaid }}
							</view>
						</view>
						<view class="tui-order-text">待付款</view>

					</view>
					<view class="tui-order-item" @tap="myOrder(2)">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/mine/list.png" class="tui-order-icon"></image>
							<view class="tui-badge tui-badge-red"
								v-if="tageList.order_num && tageList.order_num.nosend && tageList.order_num.nosend>=1">
								{{tageList.order_num.nosend}}
							</view>
						</view>
						<view class="tui-order-text">待发货</view>
					</view>
					<view class="tui-order-item" @tap="myOrder(3)">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/images/mall/my/icon_daishouhuo_3x.png" class="tui-order-icon"></image>
							<view class="tui-badge tui-badge-red"
								v-if="tageList.order_num && tageList.order_num.noget && tageList.order_num.noget>=1">
								{{tageList.order_num.noget}}
							</view>
						</view>
						<view class="tui-order-text">待收货</view>
					</view>
					<view class="tui-order-item" @tap="myOrder(4)">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/mine/evaluate.png" class="tui-order-icon"></image>
							<view class="tui-badge tui-badge-red"
								v-if="tageList&&tageList.order_num && tageList.order_num.nocomment">
								{{tageList.order_num.nocomment}}
							</view>
						</view>
						<view class="tui-order-text">评价</view>
					</view>
					<view class="tui-order-item" @tap="myAftersale()">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/mine/refund.png" class="tui-order-icon"></image>
							<!-- <view class="tui-badge tui-badge-red">2</view> -->
						</view>
						<view class="tui-order-text">退款/售后</view>
					</view>
				</view>
			</view>
			<!-- 优惠券 -->
			<view class="tui-box tui-order-box tui-assets-box">
				<view class="tui-order-list" style="margin-top: 20rpx;">
					<view class="tui-order-item" @tap="coupon(1)">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/mine/pay.png" class="tui-order-icon"></image>
						</view>
						<view class="tui-order-text">已领取</view>
					</view>
					<view class="tui-order-item" @tap="coupon(2)">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/mine/list.png" class="tui-order-icon"></image>
						</view>
						<view class="tui-order-text">已使用</view>
					</view>
					<view class="tui-order-item" @tap="coupon(3)">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/mine/evaluate.png" class="tui-order-icon"></image>
						</view>
						<view class="tui-order-text">已失效</view>
					</view>
					<view class="tui-order-item" @tap="coupon(4)">
						<view class="tui-icon-box">
							<image src="https://oss.taoding1688.com/static/uniapp/static/mine/refund.png" class="tui-order-icon"></image>
						</view>
						<view class="tui-order-text">领券中心</view>
					</view>
				</view>
			</view>
			<view class="tui-box tui-assets-box">
				<view class="tui-order-list tui-assets-list">
					<view class="tui-order-item" @tap="wallet">
						<view class="tui-assets-num"><text>{{userInfo.money || 0}}</text>
						</view>
						<view class="tui-assets-text">账户余额</view>
					</view>
					<view class="tui-order-item" @tap="href(8)">
						<view class="tui-assets-num">
							<text>{{userInfo.score || 0}}</text>
							<view class="tui-badge-dot"></view>
						</view>
						<view class="tui-assets-text">积分</view>
					</view>
					<view class="tui-order-item" @tap="coupon(1)">
						<view class="tui-assets-num">
							<text v-if="couponsNums && couponsNums.coupons_num">{{couponsNums.coupons_num}}</text>
							<text v-else>0</text>
							<view class="tui-badge-dot"></view>
						</view>
						<view class="tui-assets-text">优惠券</view>
					</view>
				</view>
			</view>
			<view class="tui-box tui-tool-box">
				<tui-list-cell :arrow="true" padding="0" :lineLeft="false">
					<view class="tui-cell-header">
						<view class="tui-cell-title">常用工具</view>
						<view class="tui-cell-sub">查看更多</view>
					</view>
				</tui-list-cell>
				<view class="tui-order-list tui-flex-wrap" style="justify-content: left;">
					<view class="tui-tool-item"v-for="(item,index) in content.list" :key="index">
						<view class="" v-if="item.title.text=='联系客服'">
							<button open-type="contact" class="tui-badge-box" style="background: none;">
								<view class="tui-icon-box" style="display: flex;justify-content: center;">
									<image :src="info.app.cdnurl+item.src" mode="widthFix" style="width: 70rpx;height: 70rpx;"></image>
								</view>
								<view class="tui-tool-text" style="text-align: center;">{{item.title.text}}</view>
							</button>
						</view>
						<view class="" @tap="goTo(item)" v-else>
							<view class="tui-icon-box" style="display: flex;justify-content: center;">
								<!-- <image :src="item.icon" class="tui-tool-icon"></image> -->
								<image :src="info.app.cdnurl+item.src" mode="widthFix" style="width: 70rpx;height: 70rpx;"></image>
							</view>
							<view class="tui-tool-text" style="text-align: center;">{{item.title.text}}</view>
						</view>
					</view>
				</view>
			</view>
			<!--加载loadding-->
			<tui-loadmore v-if="loadding" :index="3" type="red"></tui-loadmore>
		</view>
		<recommend />
		<tn-popup v-model="userPopup" mode="bottom" :safeAreaInsetBottom="true" :borderRadius="30" :closeBtn="true">
			<view class="" style="padding: 30rpx 30rpx;">
				<view class="" style="font-weight: bold;margin:50rpx 0rpx 20rpx 0rpx;font-size: 38rpx;">绑定手机号</view>
				<view style="color: #afb6c0;">为了您的账号安全，请使用本人手机号码</view>

				<view class="" style="padding: 50rpx 20rpx 0 20rpx;">
					<tn-form :model="form" ref="form" :labelWidth="120">
						<tn-form-item label="手机号">
							<tn-input v-model="form.phone" />
						</tn-form-item>
						<tn-form-item label="验证码">
							<tn-input v-model="form.code" />
							<view class="" slot="right">
								<tn-verification-code :seconds="seconds" @end="end" @start="start"
									ref="verificationCode" style="width: 100%;"
									@change="codeChange"></tn-verification-code>
								<tn-button @tap="getCode" :plain="true" shape="round" :fontSize="24">{{tips}}</tn-button>
							</view>
						</tn-form-item>
					</tn-form>
					<view class="" style="width: 100%;padding: 0 50rpx;margin-top: 30rpx;">
						<view class=""
							style="width: 100%;background: #01BEFF;color: #fff;border-radius:50rpx;padding: 20rpx;text-align: center;"
							@click="submit">提交</view>
					</view>
				</view>
			</view>
		</tn-popup>
	</view>
</template>

<script>
	import {
		wechatLogin
	} from "@/util/wechat"
	import recommend from '@/components/recommend.vue'
	import {
		getUserProfile,
		getUserData,
		getThirdWechatLogin,
		postShopSend,
		getUserChangeMobile,
		getInit
	} from "@/apis/index.js"
	import {
		getToken
	} from '@/util/auth';
	export default {
		components: {
			recommend
		},
		onLoad: function(options) {
			let obj = {};
			// #ifdef MP-WEIXIN
			obj = wx.getMenuButtonBoundingClientRect();
			// #endif
			// #ifdef MP-BAIDU
			obj = swan.getMenuButtonBoundingClientRect();
			// #endif
			// #ifdef MP-ALIPAY
			my.hideAddToDesktopMenu();
			// #endif

			uni.getSystemInfo({
				success: res => {
					this.width = obj.left || res.windowWidth;
					this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44;
					this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6;
					this.scrollH = res.windowWidth * 0.6;
				}
			});
		},
		data() {
			return {
				userPopup: false,
				couponsNums: {},
				tageList: [],
				userInfo: {},
				tuniaoColorList: this.$tn.color.getTuniaoColorList(),
				show: false,
				isLogin: false,
				webURL: 'https://www.thorui.cn/wx',
				top: 0, //标题图标距离顶部距离
				opacity: 0,
				scrollTop: 0.5,
				productList: [],
				pageIndex: 1,
				loadding: false,
				pullUpOn: true,
				// couponsNum:0,
				list: [],
				tips: '',
				seconds: 60,
				form: {
					phone: '',
					code: ''
				},
				rules: {
					phone: [{
						required: true,
						message: '请输入手机号',
						// 可以单个或者同时写两个触发验证方式 
						trigger: ['change', 'blur'],
					}],
					code: [{
						required: true,
						message: '请输入验证码',
						// 可以单个或者同时写两个触发验证方式 
						trigger: ['change', 'blur'],
					}]
				},
				content:[]
			};
		},
		mounted() {
			this.getInits()
		},
		async onShow() {
			// #ifdef MP-WEIXIN
			try {
				const id = await wechatLogin();
				this.$tn.vuex('sessionId', id)
			} catch (error) {
				console.error(error);
			}
			// #endif
			this.isLogin = getToken()
			if (this.isLogin) {
				this.getUserInfo()
				this.getUserCoupons()
			}
		},
		onReady() {
			// this.$refs.form.setRules(this.rules);
		},
		methods: {
			submit() {
				const phoneRegex = /^1[3456789]\d{9}$/;
				if (!this.form.phone) {
					uni.showToast({
						title: '请输入手机号',
						icon: 'none'
					})
					return
				}
				if (!phoneRegex.test(this.form.phone)) {
					uni.showToast({
						title: '手机号码不合法',
						icon: 'none'
					});
					return
				}
				if (!this.form.code) {
					uni.showToast({
						title: '请输入验证码',
						icon: 'none'
					})
					return
				}
				getUserChangeMobile({
					mobile: this.form.phone,
					code: this.form.code
				}).then(res => {
					if (res.code == 1) {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
						this.form.phone = ''
						this.form.code = ''
						this.userPopup = false
						this.getUserInfo()
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				})
			},
			async getInits() {
				let res = await getInit()
				let list = res.data.template.user.data.find(item=>{
					if (item.type=='menuGrid') {
						return item
					}
				})
				this.content=list.data
			},
			codeChange(text) {
				this.tips = text
			},
			getCode() {
				if (!this.form.phone) {
					uni.showToast({
						title: '请输入手机号',
						icon: 'none'
					})
					return
				}
				const phoneRegex = /^1[3456789]\d{9}$/;
				if (!phoneRegex.test(this.form.phone)) {
					uni.showToast({
						title: '手机号码不合法',
						icon: 'none'
					});
					return
				}
				if (this.$refs.verificationCode.canGetCode) {
					// 模拟向后端请求验证码
					let obj = {
						mobile: this.form.phone,
						event: "changemobile",
					}
					uni.showLoading({
						title: '正在获取验证码'
					})
					postShopSend(obj).then(res => {
						uni.hideLoading()
						if (res.code == 1) {
							console.log(res, '------------------------')
							// 通知验证码组件内部开始倒计时
							this.$refs.verificationCode.start()
						}
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
						// 这里此提示会被this.start()方法中的提示覆盖

					})
				} else {
					uni.showToast({
						title: '倒计时结束后再发送',
						icon: 'none'
					})
				}
			},
			end() {
				uni.showToast({
					title: '倒计时结束',
					icon: 'none'
				})
			},
			start() {
				uni.showToast({
					title: '倒计时开始',
					icon: 'none'
				})
			},
			bindphone() {
					if (this.isLogin) {
						this.userPopup = true
					}else{
						uni.navigateTo({
							url:'/templatePage/login/demo4/demo4'
						})
					}
			},
			//获取个人信息
			async getUserCoupons() {
				let res = await getUserData()
				if (res.code == 1 && res.data) {

					this.couponsNums = res.data.coupons_num
					this.tageList = res.data
					this.$tn.vuex('couponsNum', res.data)
				}

			},
			update() {
				this.getUserInfo()
			},
			getUserInfo() {
				getUserProfile().then(res => {
					this.userInfo = res.data
					this && this.$tn.vuex('userInfos', res.data)
				})
			},
			wallet() {
				uni.navigateTo({
					url: '/templatePage/wallet/wallet'
				})
			},
			//我的订单
			myOrder(index) {
				uni.navigateTo({
					url: `/templatePage/myOrder/myOrder?index=${index}`
				})
			},
			//优惠券
			coupon(index) {
				if (index == 4) {
					uni.navigateTo({
						url: '/templatePage/coupon/demo1/demo1'
					})
				} else {
					uni.navigateTo({
						url: `/templatePage/coupon/myCoupon/myCoupon?index=${index}`
					})
				}
			},
			openLogin() {
				this.show = true;
			},
			maskClick() {
				this.show = false;
			},
			loginSuccessFun(code) {
				this.show = false;
				uni.showToast({
					icon: 'none',
					duration: 10000,
					title: '获取手机code==>' + code
				});
			},
			goTo(page) {
				if(page.label=='清理缓存'){
					uni.showModal({
						title: '提示',
						content: '清理缓存需要重新登陆',
						success: function (res) {
							if (res.confirm) {
								uni.clearStorageSync()
								uni.navigateTo({
									url: '/templatePage/login/demo4/demo4'
								})
								return
							} else if (res.cancel) {
								return
							}
						}
					});
				}
				uni.navigateTo({
					url: page.url
				});
			},
			userInfoClick() {
				uni.navigateTo({
					url: `/templatePage/userInfo/userInfo?detail=${JSON.stringify(this.userInfo)}`
				})
			},
			href(page) {
		
			},
			detail: function() {
				return
				uni.navigateTo({
					url: '/pages/index/productDetail/productDetail'
				});
			},
			//售后列表
			myAftersale() {
				uni.navigateTo({
					url: '/templatePage/aftersale/aftersale'
				})
			},
			initNavigation(e) {
				this.opacity = e.opacity;
				this.top = e.top;
			},
			opacityChange(e) {
				this.opacity = e.opacity;
			},
			async login() {
				uni.navigateTo({
					url: '/templatePage/login/demo4/demo4'
				})
			}
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		onPullDownRefresh() {
			setTimeout(() => {
				uni.stopPullDownRefresh();
			}, 200);
		},
		onReachBottom: function() {
			if (!this.pullUpOn) return;
			this.loadding = true;
			if (this.pageIndex == 4) {
				this.loadding = false;
				this.pullUpOn = false;
			} else {
				let loadData = JSON.parse(JSON.stringify(this.productList));
				loadData = loadData.splice(0, 10);
				if (this.pageIndex == 1) {
					loadData = loadData.reverse();
				}
				this.productList = this.productList.concat(loadData);
				this.pageIndex = this.pageIndex + 1;
				this.loadding = false;
			}
		}
	};
</script>

<style lang="scss" scoped>
	.tui-header-box {
		width: 100%;
		padding: 0 30rpx 0 20rpx;
		box-sizing: border-box;
		position: fixed;
		top: 0;
		left: 0;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		height: 32px;
		transform: translateZ(0);
		z-index: 9999;
	}

	/* #ifndef MP */
	.tui-header-icon {
		min-width: 120rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	/* #endif */
	/* #ifdef MP */
	.tui-set-box {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	/* #endif */
	.tui-icon-box {
		position: relative;
		margin: 5rpx 0;
	}

	.tui-icon-setup {
		margin-left: 8rpx;
	}

	.tui-badge {
		position: absolute;
		font-size: 24rpx;
		height: 32rpx;
		min-width: 20rpx;
		padding: 0 6rpx;
		border-radius: 40rpx;
		right: 10rpx;
		top: -5rpx;
		transform: scale(0.8) translateX(60%);
		transform-origin: center center;
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 10;
	}

	.tui-badge-red {
		background: #f74d54;
		color: #fff;
	}

	.tui-badge-white {
		background: #fff;
		color: #f74d54;
	}

	.tui-badge-dot {
		position: absolute;
		height: 12rpx;
		width: 12rpx;
		border-radius: 50%;
		right: -12rpx;
		top: 0;
		background: #f74d54;
	}

	.tui-mybg-box {
		width: 100%;
		/* height: 464rpx; */
		/* position: relative; */
	}

	.tui-my-bg {
		width: 100%;
		height: 464rpx;
		display: block;
	}

	.tui-header-center {
		position: absolute;
		width: 100%;
		height: 128rpx;
		left: 0;
		top: 60rpx;
		padding: 0 30rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		color: #000;
	}

	.tui-avatar {
		flex-shrink: 0;
		width: 128rpx;
		height: 128rpx;
		display: block;
	}

	.tui-info {
		width: 60%;
		padding-left: 30rpx;
	}

	.tui-login {
		width: 60%;
		padding-left: 30rpx;
		font-size: 32rpx;
		line-height: 32rpx;
		color: #000;
		display: flex;
		align-items: center;
	}

	.tui-nickname {
		font-size: 30rpx;
		font-weight: 500;
		color: #fff;
		display: flex;
		align-items: center;
	}

	.tui-img-vip {
		width: 56rpx;
		height: 24rpx;
		margin-left: 18rpx;
	}

	.tui-explain {
		width: 80%;
		font-size: 24rpx;
		font-weight: 400;
		color: #fff;
		opacity: 0.75;
		padding-top: 8rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.tui-btn-edit {
		flex-shrink: 0;
		padding-right: 22rpx;
	}

	.tui-header-btm {
		width: 100%;
		padding: 10rpx 30rpx;
		box-sizing: border-box;
		/* position: absolute; */
		left: 0;
		/* top: 280rpx; */
		display: flex;
		align-items: center;
		justify-content: space-between;
		color: #fff;
	}

	.tui-btm-item {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.tui-btm-num {
		font-size: 32rpx;
		font-weight: 600;
		position: relative;
	}

	.tui-btm-text {
		font-size: 24rpx;
		opacity: 0.85;
		padding-top: 4rpx;
	}

	.tui-content-box {
		width: 100%;
		padding: 0 20rpx;
		box-sizing: border-box;
		/* position: relative; */
		/* top: -72rpx; */
		z-index: 10;
	}

	.tui-content {
		width: 100%;
		padding: 0 30rpx;
		box-sizing: border-box;
		z-index: 10;
		/* position: relative;
		top: -190rpx; */
		margin-bottom: 20rpx;
	}

	.tui-box {
		width: 100%;
		background: #fff;
		box-shadow: 0.1875rem 0.3125rem 0.75rem rgba(126, 126, 126, 0.1);
		border-radius: 20rpx;
		overflow: hidden;
		padding: 20rpx 0;
	}

	.tui-order-box {
		/* height: 208rpx; */
	}

	.tui-cell-header {
		width: 100%;
		height: 74rpx;
		padding: 0 26rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.tui-cell-title {
		font-size: 30rpx;
		line-height: 30rpx;
		font-weight: 600;
		color: #333;
	}

	.tui-cell-sub {
		font-size: 26rpx;
		font-weight: 400;
		color: #999;
		padding-right: 28rpx;
	}

	.tui-order-list {
		width: 100%;
		/* height: 134rpx; */
		padding: 0 10rpx;
		box-sizing: border-box;
		display: flex;
		/* align-items: center; */
		justify-content: space-between;
	}

	.tui-order-item {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.tui-order-text,
	.tui-tool-text {
		font-size: 26rpx;
		font-weight: 400;
		color: #666;
		padding-top: 4rpx;
	}

	.tui-tool-text {
		font-size: 24rpx;
	}

	.tui-order-icon {
		width: 50rpx;
		height: 50rpx;
		display: block;
	}

	.tui-assets-box {
		/* height: 178rpx; */
		margin-top: 20rpx;
	}

	.tui-assets-list {
		height: 84rpx;
	}

	.tui-assets-num {
		font-size: 32rpx;
		font-weight: 0.75rem;
		color: #333;
		position: relative;
	}

	.tui-assets-text {
		font-size: 24rpx;
		color: #333;
		/* font-size: 0.75rem; */
		padding-top: 6rpx;
	}

	.tui-tool-box {
		margin-top: 20rpx;
	}

	.tui-flex-wrap {
		flex-wrap: wrap;
		height: auto;
		padding-bottom: 30rpx;
	}

	.tui-tool-item {
		width: 25%;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		padding-top: 30rpx;
	}

	.tui-tool-icon {
		width: 64rpx;
		height: 64rpx;
		display: block;
	}

	.tui-badge-icon {
		width: 66rpx;
		height: 30rpx;
		position: absolute;
		right: 0;
		transform: translateX(88%);
		top: -15rpx;
	}

	/*为你推荐*/
	.tui-product-list {
		display: flex;
		justify-content: space-between;
		flex-direction: row;
		flex-wrap: wrap;
		box-sizing: border-box;
	}

	.tui-product-container {
		flex: 1;
		margin-right: 2%;
	}

	.tui-product-container:last-child {
		margin-right: 0;
	}

	.tui-pro-item {
		width: 100%;
		margin-bottom: 4%;
		background: #fff;
		box-sizing: border-box;
		border-radius: 12rpx;
		overflow: hidden;
	}

	.tui-pro-img {
		width: 100%;
		display: block;
	}

	.tui-pro-content {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		box-sizing: border-box;
		padding: 20rpx;
	}

	.tui-pro-tit {
		color: #2e2e2e;
		font-size: 26rpx;
		line-height: 32rpx;
		word-break: break-all;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.tui-pro-price {
		padding-top: 18rpx;
	}

	.tui-sale-price {
		font-size: 34rpx;
		font-weight: 500;
		color: #e41f19;
	}

	.tui-factory-price {
		font-size: 24rpx;
		color: #a0a0a0;
		text-decoration: line-through;
		padding-left: 12rpx;
	}

	.tui-pro-pay {
		padding-top: 10rpx;
		font-size: 24rpx;
		color: #656565;
	}

	.order-message {
		padding: 15rpx 16rpx;
		border-radius: 20rpx;
		background: #f3f5f7;
		align-items: center;
		margin-top: 20rpx;
	}

	.flex {
		display: flex;
	}

	.goods-image {
		border-radius: 20rpx;
		width: 100rpx;
		height: 100rpx;
	}

	.order-into {
		margin-left: 10rpx;
		font-size: 24rpx;
	}

	.tips {
		font-size: 24rpx;
		color: #999;
		letter-spacing: 2rpx;
		margin-top: 10rpx;
	}
</style>